package cn.itcast.service.impl;

import cn.itcast.dao.AccountDao;
import cn.itcast.domain.Account;
import cn.itcast.service.AccountService;

import java.util.List;

public class AccountServiceImpl implements AccountService {
    private AccountDao accountDao;

    public List<Account> findAll() {
        return accountDao.findAll();
    }

    @Override
    public int add(Account account) {
        return accountDao.add(account);
    }

    @Override
    public void delete(Integer id) {
          accountDao.delete(id);
    }

    @Override
    public void update(Account account) {
          accountDao.update(account);
    }


    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }
}
